<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Grom Hellscream
 * Date: 11/2/12
 * Time: 11:33 AM
 * To change this template use File | Settings | File Templates.
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.tooltip');

$item = $this->get('item');

if (!JFactory::getUser()->authorise('vast.hosocanbo.edit', 'com_vast') 
    || !JFactory::getUser()->authorise('vast.hosocanbo.edit.own', 'com_vast')
    || (JFactory::getUser()->authorise('vast.hosocanbo.edit.own', 'com_vast') && JFactory::getUser()->id != $item['id']))
{
    JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_vast&view=vast'));    
}

?>

<div id="crumbs">
    <div style="color: #222222;font-weight: normal;margin: 0;padding: 0">
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=vast') ?>">Trang chủ</a> »
        <span>Sửa mật khẩu</span>
    </div>
</div>

<div id="main" class="home">

<h3 class="title green">Sửa mật khẩu của tài khoản <?php echo $item['username']; ?></h3>

<div class="form">
    <form class="commentform form-validate" action="<?php echo JRoute::_('index.php?option=com_vast&view=suamatkhau&id=' . $item['id']); ?>" method="post" id="updatecanbo" name="adminForm">
        
        <div class="row">
            <?php echo $this->form->getLabel('id'); ?>
            <?php echo $this->form->getInput('id'); ?>
        </div>
                
        <div class="row">
            <?php echo $this->form->getLabel('password'); ?>
            <?php echo $this->form->getInput('password'); ?>
        </div>
        
        <div class="row">
            <?php echo $this->form->getLabel('password2'); ?>
            <?php echo $this->form->getInput('password2'); ?>
        </div>

        <div class="row">
            <input type="hidden" name="option" value="com_vast" />
            <input type="hidden" name="task" value="suamatkhau.submit" />
        </div>
        
        <div class="row buttons">
            <button type="submit" class="button validate" id="submit"><?php echo JText::_('Cập nhật'); ?></button>
            <?php echo JHtml::_('form.token'); ?>
        </div>
    </form>
</div>
<div class="clr"></div>
</div>